<div class="card border-info m-3">
    <h5 class="card-header bg-info text-white">修改</h5>
    <div class="card-body">
        <fieldset [disabled]="extend.disabledForms">
            <h5 class="card-title">基础信息</h5>
            <p class="card-text">请按内容提示，录入相关信息。</p>
            <div class="row mb-3">
                <div class="col-6">
                    <ng-select
                            [items]="extend.domain.enumGoodsType.items"
                            [multiple]="false"
                            [closeOnSelect]="true"
                            [searchable]="true"
                            [disabled]="extend.disabledForms"
                            bindLabel="name" bindValue="id"
                            placeholder="{{extend.domain.enumGoodsType.nickname}}"
                            tooltip="{{extend.domain.enumGoodsType.nickname}}"
                            [(ngModel)]="domain.enumGoodsType"
                            (change)="extend.domain.enumGoodsType.change($event)">
                    </ng-select>
                    <span class="badge badge-danger"
                          *ngIf="errRes.error?.detail['GooInventory.enumGoodsType'] !== null">{{errRes.error?.detail['GooInventory.enumGoodsType']}}</span>
                </div>
                <div class="col-6">
                </div>
            </div>
            <div class="row mb-3">
                <div class="col-12">
                    <ng-select
                            [items]="extend.domain.linkedGoods.items"
                            [multiple]="false"
                            [closeOnSelect]="true"
                            [searchable]="true"
                            [disabled]="extend.disabledForms"
                            bindLabel="name" bindValue="id"
                            placeholder="{{extend.domain.linkedGoods.nickname}}"
                            tooltip="{{extend.domain.linkedGoods.nickname}}"
                            [(ngModel)]="domain.fkGoods"
                            (change)="extend.domain.linkedGoods.change($event)">
                    </ng-select>
                    <span class="badge badge-danger" *ngIf="errRes.error?.detail['GooInventory.fkGoods'] !== null">{{errRes.error?.detail['GooInventory.fkGoods']}}</span>
                </div>
            </div>
            <div class="row mb-3">
                <div class="col-6">
                    <div class="input-group">
                        <div class="input-group-prepend w-25">
                            <button class="btn btn-info border-info w-100" type="button">备注</button>
                        </div>
                        <input type="text" class="form-control border-info" [(ngModel)]="domain.serMemo">
                    </div>
                </div>
            </div>
            <div class="row mb-3">
                <div class="col-6">
                    <div class="input-group">
                        <div class="input-group-prepend w-25">
                            <button class="btn btn-info border-info w-100" type="button">库存增量</button>
                        </div>
                        <input type="text" class="form-control border-info border-right-0"
                               [(ngModel)]="domain.serAmount">
                        <div class="input-group-append border-info">
                            <span class="input-group-text border-info border-left-0 bg-white">整数</span>
                        </div>
                    </div>
                    <span class="badge badge-danger" *ngIf="errRes.error?.detail['GooInventory.serAmount'] !== null">{{errRes.error?.detail['GooInventory.serAmount']}}</span>
                </div>
                <div class="col-6">
                    <input type="hidden" class="form-control border-info" [readonly]="true"
                           [(ngModel)]="domain.serAudit">
                    <div class="input-group">
                        <div class="input-group-prepend w-25">
                            <button class="btn btn-info border-info w-100" type="button">审核状态</button>
                        </div>
                        <input type="text" class="form-control border-info" [readonly]="true"
                               [value]="extend.domain.serAudit.nickname">
                    </div>
                    <span class="badge badge-danger" *ngIf="errRes.error?.detail['GooInventory.serAudit'] !== null">{{errRes.error?.detail['GooInventory.serAudit']}}</span>
                </div>
            </div>
            <div class="row mb-3">
                <div class="col-12">
                    <div [froalaEditor]='froalaEditorOptions' [(froalaModel)]="domain.serEditorContent">Hello, Froala!
                    </div>
                </div>
            </div>

            <div class="text-center mt-5">
                <button type="button" class="btn btn-outline-primary" (click)="func.update.req($event)">Save</button>
            </div>
        </fieldset>
    </div>
</div>

<span class="badge badge-info mr-3" *ngIf="errRes?.error?.timestamp !== null">response time: {{errRes?.error?.timestamp}}</span>

<div *ngIf="false">
    <p>{{errRes?.error}}</p>
    <p>{{errRes?.error?.code}}</p>
    <p>{{errRes?.error?.description}}</p>
    <p>{{errRes?.error?.theme}}</p>
    <p>{{errRes?.error?.timestamp}}</p>
    <p>{{errRes?.error?.detail?.RR?.duration}}</p>
    <p>{{errRes?.error?.detail['GooInventory.serNum']}}</p>
    <p>{{errRes?.error?.detail['GooInventory.serAudit']}}</p>
    <p>{{errRes?.error?.detail['GooInventory.serValid']}}</p>
    <p>{{errRes?.error?.detail['GooInventory.serValid2']}}</p>
    <p>{{errRes?.headers}}</p>
    <p>{{errRes?.message}}</p>
    <p>{{errRes?.name}}</p>
    <p>{{errRes?.ok}}</p>
    <p>{{errRes?.status}}</p>
    <p>{{errRes?.statusText}}</p>
    <p>{{errRes?.url}}</p>
</div>
